From: David Scott Date: Thu, 9 Oct 2014 09:17:30 +0000 (+0100) Subject: xl: 'replace_string' now uses xstrdup X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4170 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=d87ab990c1aaa7d083a49081e8b33b8d10a88f7f;p=xen.git xl: 'replace_string' now uses xstrdup This catches the out-of-memory exception and exits the program. Signed-off-by: David Scott Acked-by: Wei Liu --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index be809c8fb4..70d70bdfb0 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -839,7 +839,7 @@ static void parse_vcpu_affinity(libxl_domain_build_info *b_info, static void replace_string(char **str, const char *val) { free(*str); - *str = strdup(val); + *str = xstrdup(val); } static void parse_config_data(const char *config_source,